<template>
  <div class="phone-mockup">
    <div class="phone-header">
      <img src="@/assets/assets/phone-head.png" alt="" />
      <h3 class="text-center border-b-1 border-gray-300">战略微头条</h3>
    </div>
    <div class="content">
      <h2 class="title">战略微头条 | (NO.07) 2024.08.05-08.11</h2>
      <div class="meta">
        <span class="read-count">👁️ 0人阅读</span>
        <span class="time">🕒 --</span>
      </div>

      <div class="news-title">
        <span class="diamond">◆</span>
        <span class="main-title">新闻周报</span>
        <span class="diamond">◆</span>
      </div>

      <div class="news-items-container">
        <div  class="news-item">
          <div class="news-number flex half-image-container">
            <img src="@/assets/assets/0.svg" class="half-image top-half" />
            <img src="@/assets/assets/1.svg" class="half-image top-half" />
          </div>
          <h3></h3>
          <p class="source"></p>
          <p class="summary"></p>
          <a href="#" class="read-more"></a>
          <div class="divider"></div>
        </div>
      </div>

      <div class="no-news">
        <p>暂无新闻数据</p>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const pendingNews = ref([])
</script>

<style scoped>
.phone-mockup {
  width: 375px;
  height: 700px;
  border-radius: 40px;
  border: 8px solid black;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  background-color: white;
}

.phone-header {
  height: 80px;
  overflow: hidden;
}

.content {
  padding: 20px;
  height: calc(100% - 80px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-width: none;
}

.content::-webkit-scrollbar {
  display: none;
}

.title {
  font-size: 18px;
  margin-bottom: 15px;
  font-weight: bold;
}

.meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 14px;
  color: #666;
}

.read-count,
.time {
  display: flex;
  align-items: center;
  gap: 5px;
}

.news-title {
  text-align: center;
  margin: 20px 0;
  font-size: 22px;
  color: #1a73e8;
  font-weight: bold;
  position: relative;
}

.news-title .diamond {
  color: #1a73e8;
  font-size: 20px;
  margin: 0 10px;
}

.news-title .main-title {
  position: relative;
  padding-bottom: 5px;
  border-top: 2px solid #1a73e8;
  border-bottom: 2px solid #1a73e8;
}

.news-item {
  margin-bottom: 20px;
  padding: 15px;
}

.news-number {
  color: #1a73e8;
  font-size: 24px;
  margin-right: 10px;
  vertical-align: middle;
  display: flex;
  align-items: center;
}

.half-image-container {
  display: flex;
  align-items: flex-start;
  height: 20px;
  position: relative;
}

.half-image {
  width: 30px;
  height: 30px;
  object-fit: contain;
  transform: translateY(20%);
  clip-path: polygon(0 0, 100% 0, 100% 55%, 0 70%);
  margin-right: 2px;
}

.news-item h3 {
  margin: 5px 0 10px;
  font-size: 16px;
  color: #333;
}

.source {
  color: #666;
  font-size: 14px;
  margin: 10px 0;
}

.summary {
  color: #555;
  line-height: 1.5;
  margin-bottom: 15px;
}

.read-more {
  color: #1a73e8;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
  margin-bottom: 10px;
}

.divider {
  width: 90%;
  height: 2px;
  background-color: #1890ff;
  margin-top: 10px;
  position: relative;
}

.divider::after {
  content: '///';
  position: absolute;
  right: -15%;
  top: -10px;
  color: #1a73e8;
  font-size: 14px;
  font-weight: bold;
}

.no-news {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}
</style>
